package com.xpffly.design.decorator.common.service.impl;

import com.xpffly.design.decorator.common.service.Component;

/**
 * @Author: xpengfei
 * @Date: 2021/4/8 23:49
 * @Description：具体装饰类2
 */
public class ConcreteDecorator2 extends Decorator {
    public ConcreteDecorator2(Component component) {
        super(component);
    }

    /**
     * 装饰方法2
     */
    private void method2() {
        System.out.println("装饰方法2...");
    }

    /**
     * 重写父类抽象方法
     */
    @Override
    public void operate() {
        super.operate();
        this.method2();
    }
}

